package demo1;

/**
 * @Author 12629
 * @Description：
 */
class Base {
    public int a = 100;
    public int b = 200;

    public void test() {
        System.out.println("Base :: test()方法执行了....");
    }
}
class Derived extends Base {
    public int a = 101;
    public int c = 201;

    public void test() {
        System.out.println("Derived :: test()方法执行了....");
    }
    public void method() {
        /*System.out.println(this.a+" ," + b +" ,"+c);
        System.out.println(super.a);*/
        System.out.println("Derived :: method()方法执行了....");
    }
    public  void method2() {
        this.test();
        super.test();
        method();
    }
}
class C extends Derived {
    void testT() {
        System.out.println(super.a);
    }
}
public class Test {
    public static void main(String[] args) {
        C c = new C();
        c.testT();
    }
    public static void main1(String[] args) {
        Derived derived = new Derived();
        derived.method2();
        //System.out.println(derived.a);
    }
}
